#!/usr/bin/env python

import optparse
import os

import charmicat

def main():
    '''
    ccat_relink.py [opts] path

    Walk down `path', remaking links for all directories with `pass' directories within.
    '''

    op = optparse.OptionParser(usage=main.__doc__)

    opts, args = op.parse_args()

    if len(args) == 0:
        msg = 'Please supply an input path.'
        raise charmicat.BadCommandLineError(msg, -1)

    path = args[0]
        



if __name__ == "__main__":
    try:
        sys.exit(main())
    except charmicat.BadCommandLineError, e:
        import os
        sys.stderr.write(str(e) + "\n")
        sys.stderr.write("See `{0} -h' for more.\n".format(os.path.basename(sys.argv[0])))
        sys.stderr.flush()
        sys.exit(e.retcode)
